-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[gatsby] Compare location object instead of just pathname #4292
[gatsby] Compare location object instead of just pathname #4292
Conversation
Deploy preview for gatsbygram ready! Built with commit 17230a8 |
@@ -12,6 +12,7 @@ import history from "./history" | |||
window.___history = history | |||
import emitter from "./emitter" | |||
window.___emitter = emitter | |||
import { isEqual } from "lodash" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the shallow-compare package as we're already using that so it require any extra code
import shallowCompare from "shallow-compare" |
Thanks for jumping on a fix! |
Thanks! |
Comparing the window and router location objects didn't work as the window object has a bunch of other stuff on it. Instead it seems best to just compare the things we care about directly. Put up a PR for this #4339 |
Hiya @paulathevalley! 👋 This is definitely late, but on behalf of the entire Gatsby community, I wanted to say thank you for being here. Gatsby is built by awesome people like you. Let us say “thanks” in two ways:
If you have questions, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’. Thanks again! 💪💜 |
re: #3802
This PR compares
window.location
andlocation
objects instead of just their pathnames.Let me know if there is a better approach. Thanks!